using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;


namespace Dealer
{
    public partial class VehicleSearch : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Vehicle1.BranchIdLocationList = "638|2264|2266";
                Vehicle1.EnableLog = false;
                Vehicle1.CustomizedFilterCode = "";
                Vehicle1.LoadData();

                //LoadData();
            }
            //SearchBoxLongControl.BranchIdLocationList = "638|2264|2266";
            //SearchBoxLongControl.SearchButtonClicked += new EventHandler(SearchBoxLong_SearchButtonClicked);
        }

        protected void Page_Init(object sender, EventArgs e)
        {

        }

        public void LoadData()
        {
            //SearchBoxLongControl.BranchIdLocationList = "638|2264|2266";
            //SearchResultsControl.LoadData();
            //SearchBoxLongControl.SearchButtonClicked += new EventHandler(SearchBoxLong_SearchButtonClicked);
        }

        private void SearchBoxLong_SearchButtonClicked(object sender, EventArgs e)
        {
            /*
            SearchResultsControl.ManufacturerId = SearchBoxLongControl.SelectedManufacturerId;
            SearchResultsControl.ModelId = SearchBoxLongControl.SelectedModelId;
            SearchResultsControl.YearRange = SearchBoxLongControl.SelectedYearFrom + "|" + SearchBoxLongControl.SelectedYearTo;
            SearchResultsControl.PriceRange = SearchBoxLongControl.SelectedPriceFrom + "|" + SearchBoxLongControl.SelectedPriceTo;
            SearchResultsControl.BranchIdLocationList = SearchBoxLongControl.BranchIdLocationList;
            SearchResultsControl.CustomizedFilterCode = "";

            SearchResultsControl.LoadData();

            //VehicleMultiView.ActiveViewIndex = 0;
            //VechicleMultiView.SetActiveView(SearchResultsView);
            SearchBoxLongControl.SearchButtonClicked += new EventHandler(SearchBoxLong_SearchButtonClicked);

            
            //divMessage.InnerHtml = string.Empty;
            if (SearchResultsControl.Rows <= 0)
            {
                //divMessage.InnerHtml = "No records found";
            }
            **/
        }
    }

}